<div class="fsh-pop">
    <div id="show_form" class="layui-form" lay-filter="show_form">
        <div class="layui-form-item layui-form-text">
            <div class="layui-input-inline">
                <label class="layui-form-label"><i>*</i>计划ID</label>
                <div class="layui-input-block">
                    <input type="text" name="plan_id" class="layui-input" readonly value="<%=%>">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label"><i>*</i>计划名称</label>
                <div class="layui-input-block">
                    <input id="title" type="text" name="title" lay-verify="" readonly placeholder="请输入关键字" class="layui-input"
                           value="<%=title%>">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><i>*</i>计划名称</label>
                <div class="layui-input-block">
                   <textarea id="allData"></textarea>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use(['form'], function () {
        var originData = JSON.parse($('<div>').html('<%=$data%>').text());
        layui.form.val('show_form', originData);
        console.log(originData);
        if(originData.course_plan_id){
            ajax({
                type: "get",
                url: context + '/api/eduCoursePlan/getListByTopPid?course_plan_id=' + originData.course_plan_id,
                success: function (result) {
                    if (result.success) {
                        var d = result.data;
                        $("#allData").val(d);
                    } else {
                        showAlert(result.errorMsg||result.msg);
                    }
                }
            });
        }

    });

</script>